package com.fang.excel.controller;

import com.fang.sensi.SensitiveWordFilter;
import com.quanzhi.openapi.controller.BaseEntityController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/api/v1")
public class TtController extends BaseEntityController {


    @Autowired
    private SensitiveWordFilter sensitiveWordFilter;



    @PostMapping("/upload")
    public ResponseEntity<String> uploadFile(String text) {
        String filter = sensitiveWordFilter.filter(text);
        return ResponseEntity.ok(filter);
    }

}
